package user;

import book.BookList;
import operation.IOperation;

/**
 * Created with IntelliJ IDEA.
 * Description:定义一个父类
 * User: 86183
 */
public  abstract class User  {
    public String name;
    public IOperation[] iOperations;//定义一个IOperation接口类型的数组,用于存储操作对象
    //构造方法
    public User(String name) {
        this.name = name;
    }
    //抽象方法
    public abstract int menu();
    public void UseIOperation(int choice, BookList bookList){
        //调用选择choice的具体操作对象的work方法
        iOperations[choice].work(bookList);
    }
}
